

package com.cn.项目.飞机预约管理系统.Logining;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class SelectIdentity extends JFrame {
    public SelectIdentity() {
        initComponents();
    }


    //管理者
    private void button1ActionPerformed(ActionEvent e) {
        new logining(); //跳转到管理者界面
    }

    //用户
    private void button2ActionPerformed(ActionEvent e) {
        // TODO add your code here
        new UserLogin();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        button1 = new JButton();
        button2 = new JButton();
        label1 = new JLabel();

        //======== this ========
        setVisible(true);
        Container contentPane = getContentPane();
        contentPane.setLayout(null);

        //---- button1 ----
        button1.setText("管理者");
        button1.setFont(button1.getFont().deriveFont(button1.getFont().getSize() + 8f));
        button1.setForeground(new Color(0, 204, 51));
        button1.addActionListener(e -> button1ActionPerformed(e));
        contentPane.add(button1);
        button1.setBounds(40, 90, 145, 40);

        //---- button2 ----
        button2.setText("用户");
        button2.setFont(button2.getFont().deriveFont(button2.getFont().getSize() + 8f));
        button2.setForeground(new Color(0, 153, 153));
        button2.addActionListener(e -> button2ActionPerformed(e));
        contentPane.add(button2);
        button2.setBounds(40, 160, 145, 40);

        //---- label1 ----
        label1.setText("请选择您的身份");
        label1.setFont(label1.getFont().deriveFont(label1.getFont().getSize() + 8f));
        label1.setForeground(new Color(255, 153, 153));
        contentPane.add(label1);
        label1.setBounds(40, 25, 195, 30);

        contentPane.setPreferredSize(new Dimension(235, 320));
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    private JButton button1;
    private JButton button2;
    private JLabel label1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
